{extend name="template/base_iframe" /}


{block name="content"}

    <div id="loginform" class="loginBox">
        <form class="form form-horizontal" action="{:url('add_proc')}" method="post" id="ajaxSubmitForm">
            <!-- 上级权限 -->
            <input type="hidden" name="pid" value="{$data.pid|default='0'}">
            <input type="hidden" name="id" value="{$data.id|default='0'}">

            <div class="row cl">
                <label class="form-label col-xs-3 col-ms-3">规则名称</label>
                <div class="formControls col-xs-6 col-ms-6">
                    <input name="name" type="text" placeholder="例：admin/index/index" class="input-text radius auth-name" value="{$data.name}">
                </div>
            </div>

            <div class="row cl">
                <label class="form-label col-xs-3 col-ms-3">规则描述</label>
                <div class="formControls col-xs-6 col-ms-6">
                    <input name="title" type="text" placeholder="例：后台首页" class="input-text radius auth-title"  value="{$data.title}">
                </div>
            </div>

            <div class="row cl">
                <label class="form-label col-xs-3 col-ms-3">状态</label>
                <div class="skin-minimal">
                  <div class="radio-box">
                    <input type="radio" id="status-1" class="ara-radio" name="status" value="1" {$data.status? 'checked' :'' }/>
                    <label for="status-1">开启</label>
                  </div>
                  <div class="radio-box">
                    <input type="radio" id="status-2" class="ara-radio" name="status" value="0" {$data.status? '' :'checked' }/>
                    <label for="status-2">关闭</label>
                  </div>
                </div>
            </div>

            <div class="row cl">
                <label class="form-label col-xs-3 col-ms-3">附加规则描述</label>
                <div class="formControls col-xs-6 col-ms-6">
                {if condition="$data.type"}
                    <input name="condition" type="text" placeholder="例：{login_count}>5 and {login_count}<400" class="input-text radius ara-condition" value="{$data.condition}"/>
                {else /}
                    <input name="condition" type="text" placeholder="例：{login_count}>2 and {login_count}<400" class="input-text radius ara-condition"/>
                {/if}
                    
                </div>
                <div class="col-xs-3 col-ms-3"></div>
            </div>

            <div class="row cl">
                <div class="formControls col-xs-6 col-xs-offset-3">
                    <input name="" type="button" class="btn btn-success radius mr-20 submit" value="修改">
                    <input name="" type="reset" class="btn btn-default radius" value="重置">
                </div>
            </div>
        </form>
    </div>

{/block}



{block name="script"}
	<script type="text/javascript" src="__AJS__/auth_rule/add.js"></script>
{/block}